<?php
session_start();
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<script type="text/javascript">
    function validateForm(){
        var id= document.getElementById('brokerID').value;
        var pass= document.getElementById('pass').value;
        var error=0;
        if(id==null || id=="")
            {
                document.getElementById('errorID').innerHTML="Please enter id!";
                error++;
            }
        if(pass==null || pass=="")
            {
                document.getElementById('errorPass').innerHTML="Please enter password!";
                error++;
            }
        if(error==0){
            document.getElementById('loginBT').disabled=false;
            document.getElementById('errorPass').innerHTML="";
            document.getElementById('errorID').innerHTML="";
        }
        else{
            document.getElementById('loginBT').disabled=true;
        }
    }
</script>
<body>
	<fieldset>
		<legend>Log in</legend>
		<p>This place is for organizers</p>
		<form name="login" action="Controller.php?action=login" method="POST">
			Username:<input onkeyup="validateForm()" type="text" name="brokerID"
				id="brokerID" />
			<p id="errorID"></p>
			Password:<input onkeyup="validateForm()" type="password" name="pass"
				id="pass" />
			<p id="errorPass"></p>
			<br>
			<button type="submit" id="loginBT" disabled>Login</button>
		</form>
	</fieldset>

	<fieldset>
		<legend>You may be want to go</legend>
		<ul>
			<li><a href="showLiveBoard.php">Live Board</a></li>
			<li><a href="showRankUser.php">Rank</a></li>
		</ul>
	</fieldset>
</body>
